# To update this list: `make -f meson/rewrite.mk curl_exe_src`.
curl_src = files(
  '../lib/base64.c',
  '../lib/curl_multibyte.c',
  '../lib/dynbuf.c',
  '../lib/nonblock.c',
  '../lib/strtoofft.c',
  '../lib/timediff.c',
  '../lib/version_win32.c',
  '../lib/warnless.c',
  'slist_wc.c',
  'terminal.c',
  'tool_bname.c',
  'tool_cb_dbg.c',
  'tool_cb_hdr.c',
  'tool_cb_prg.c',
  'tool_cb_rea.c',
  'tool_cb_see.c',
  'tool_cb_soc.c',
  'tool_cb_wrt.c',
  'tool_cfgable.c',
  'tool_dirhie.c',
  'tool_doswin.c',
  'tool_easysrc.c',
  'tool_filetime.c',
  'tool_findfile.c',
  'tool_formparse.c',
  'tool_getparam.c',
  'tool_getpass.c',
  'tool_help.c',
  'tool_helpers.c',
  'tool_ipfs.c',
  'tool_libinfo.c',
  'tool_listhelp.c',
  'tool_main.c',
  'tool_msgs.c',
  'tool_operate.c',
  'tool_operhlp.c',
  'tool_paramhlp.c',
  'tool_parsecfg.c',
  'tool_progress.c',
  'tool_setopt.c',
  'tool_sleep.c',
  'tool_ssls.c',
  'tool_stderr.c',
  'tool_strdup.c',
  'tool_urlglob.c',
  'tool_util.c',
  'tool_vms.c',
  'tool_writeout.c',
  'tool_writeout_json.c',
  'tool_xattr.c',
  'var.c',
)

curl_exe = executable(
  'curl',
  curl_src,
  dependencies: [curl_ilib_dep, libuv_dep],
  install: get_option('tool').allowed(),
)

curltool_lib = static_library(
  'curltool',
  curl_src,
  c_args: ['-DCURL_STATICLIB', '-DUNITTESTS'],
  dependencies: [build_tests, curl_iflags_dep, libuv_dep],
)

curltool_dep = declare_dependency(
  link_with: curltool_lib,
)
